/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.apli.haiam.ejb.entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Informática
 */
@Entity
@Table(name = "eme_diagnostico_ingreso_alta")
@NamedQueries({
    @NamedQuery(name = "EmeDiagnosticoIngresoAlta.findAll", query = "SELECT e FROM EmeDiagnosticoIngresoAlta e")})
public class EmeDiagnosticoIngresoAlta implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "eda_id")
    private Integer edaId;
    @Column(name = "eda_tipo")
    private Integer edaTipo;
    @Column(name = "eda_observacion")
    private String edaObservacion;
    @JoinColumn(name = "hrc_id", referencedColumnName = "hrc_id")
    @ManyToOne(fetch = FetchType.LAZY)
    private HosReferenciaContrareferencia hosReferenciaContrareferencia;
    @JoinColumn(name = "hal_id", referencedColumnName = "hal_id")
    @ManyToOne(fetch = FetchType.LAZY)
    private HosAlta hosAlta;
    @JoinColumn(name = "eat_id", referencedColumnName = "eat_id")
    @ManyToOne(fetch = FetchType.LAZY)
    private EmeAtencion emeAtencion;
    @JoinColumn(name = "cdi_id", referencedColumnName = "cdi_id")
    @ManyToOne(fetch = FetchType.LAZY)
    private CexDiagnostico cexDiagnostico;

    public EmeDiagnosticoIngresoAlta() {
    }

    public EmeDiagnosticoIngresoAlta(Integer edaId) {
        this.edaId = edaId;
    }

    public Integer getEdaId() {
        return edaId;
    }

    public void setEdaId(Integer edaId) {
        this.edaId = edaId;
    }

    public Integer getEdaTipo() {
        return edaTipo;
    }

    public void setEdaTipo(Integer edaTipo) {
        this.edaTipo = edaTipo;
    }

    public String getEdaObservacion() {
        return edaObservacion;
    }

    public void setEdaObservacion(String edaObservacion) {
        this.edaObservacion = edaObservacion;
    }

    public HosReferenciaContrareferencia getHosReferenciaContrareferencia() {
        return hosReferenciaContrareferencia;
    }

    public void setHosReferenciaContrareferencia(HosReferenciaContrareferencia hosReferenciaContrareferencia) {
        this.hosReferenciaContrareferencia = hosReferenciaContrareferencia;
    }

    public HosAlta getHosAlta() {
        return hosAlta;
    }

    public void setHosAlta(HosAlta hosAlta) {
        this.hosAlta = hosAlta;
    }

    public EmeAtencion getEmeAtencion() {
        return emeAtencion;
    }

    public void setEmeAtencion(EmeAtencion emeAtencion) {
        this.emeAtencion = emeAtencion;
    }

    public CexDiagnostico getCexDiagnostico() {
        return cexDiagnostico;
    }

    public void setCexDiagnostico(CexDiagnostico cexDiagnostico) {
        this.cexDiagnostico = cexDiagnostico;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (edaId != null ? edaId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof EmeDiagnosticoIngresoAlta)) {
            return false;
        }
        EmeDiagnosticoIngresoAlta other = (EmeDiagnosticoIngresoAlta) object;
        if ((this.edaId == null && other.edaId != null) || (this.edaId != null && !this.edaId.equals(other.edaId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "newpackage.EmeDiagnosticoIngresoAlta[ edaId=" + edaId + " ]";
    }
    
}
